import request from '@/utils/request'

// 查询参数列表
export function list(query) {
  return request({
    url: '/system/flaw/list',
    method: 'get',
    params: query
  })
}

// 查询缺陷数量
export function listNum(query) {
  return request({
    url: '/system/flaw/listNum',
    method: 'get',
    params: query
  })
}

// 修改缺陷
export function emitFlawList(data) {
  return request({
    url: '/system/flaw',
    method: 'put',
    data
  })
}

// 删除缺陷
export function deleteFlaw(query) {
  return request({
    url: '/system/flaw/' + query,
    method: 'delete'
  })
}

// 新增缺陷
export function flaw(data) {
  return request({
    url: '/system/flaw',
    method: 'post',
    data
  })
}
